]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lint: Enforce consistent return
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 12 Feb 2019 10:07:55 +0000 (11:07 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 22 Jul 2019 13:18:55 +0000 (13:18 +0000)
While all javascript functions have a return value - either an explicit
one from a return statement, or an implicit "undefined" - mixing both in
the same function is almost certainly an oversight, and more often than
not a bug.

Enable the corresponding eslint rule to catch those errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/635

lint/eslintrc-shell.json

index 9c4c96bbac8a70dba704d6b2d311f63c5c8c94f4..d8a940bbb7ced45f91506e75923ddc0ba76dc332 100644 (file)
@@ -7,6 +7,7 @@
                 "allow": ["^vfunc_", "^on_"]
             }
         ],
+        "consistent-return": "error",
         "key-spacing": [
             "error",
             {